package com.lx;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Created by lanyxp on 2020/6/20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Response<T> implements Serializable {
    private ResponseHader heder;
    private T body;

    public boolean isSuccess() {
        return heder != null && heder.getRespCode().equals(CommonResultCode.SUCCESS.getCode());
    }
}
